<template>
  <div class="about">
    <p>静态p标签</p>
    <p>{{ message }}</p>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  name: 'about',
  metaInfo: {
    title: '我是关于测试页面的title',
    meta: [
      {
        name: 'keywords',
        content: '我是关于测试页面的keywords'
      },
      {
        name: 'description',
        content: '我是关于测试页面的description'
      }
    ]
  },
  data () {
    return {
      message: ''
    }
  },
  async created () {
    try {
      axios.get('https://jsonplaceholder.typicode.com/posts/3')
      .then(response => {
          console.log(response.data.title)
          this.message = '动态p标签的内容=>' + response.data.title
      })
      .catch(error => {
          console.log(111, error.message)
          this.message = error.message
      });
    } catch (error) {
      console.log('test1', error)
    }
  },
  methods: {
    handle () {
      console.log(5555)
    },
    fetchData() {
      
    }
  }
}
</script>